<!--
 * @Author: wangyongcun@persagy.com
 * @Date: 2025-03-02 16:54:09
 * @LastEditTime: 2025-03-14 12:08:29
 * @FilePath: \vite-admin\src\views\login\index.vue
 * @Description: 登录页面
 *
-->
<template>
  <section class="wh-full overflow-hidden flex">
    <!-- 主题切换 -->
    <div class="absolute right-10 top-10">
      <AppSettingThemeSchema />
    </div>
    <!-- 背景 -->
    <div class="hidden-sm-and-down max-w-1/2">
      <img :src="bg" alt="bg" class="w-full h-full select-none" />
      <Illustration class="absolute left-20 bottom-50 w-1/3" />
    </div>
    <!-- 登录容器 -->
    <div class="h-full flex-1 flex-center flex-col">
      <div class="flex items-center m-b-10">
        <Logo />
        <h1 class="m-l-2 text-2xl">{{ title }}</h1>
      </div>
      <el-form class="min-w-96" ref="ruleFormRef" :model="ruleForm">
        <el-form-item prop="username">
          <el-input v-model="ruleForm.username" placeholder="账号" />
        </el-form-item>
        <el-form-item prop="password">
          <el-input v-model="ruleForm.password" placeholder="密码" />
        </el-form-item>
        <el-button type="primary" class="w-full m-t-4">登录</el-button>
      </el-form>
    </div>
  </section>
</template>
<script lang="ts" setup>
// 引入相关图片和svg
import bg from "@/assets/login/bg.png";
import Logo from "@/assets/login/logo.svg";
import Illustration from "@/assets/login/illustration.svg";

// 动态的配置信息：size
const appSetting = useAppSetting();
const title = appSetting.title;

const ruleForm = reactive({
  username: "admin",
  password: "admin123",
});
</script>
